package com.beidouapp.domain.pojo;

import java.io.Serializable;

/**
 * Base code dictionary item.
 */
public class Dict implements Serializable
{
    /** Item identity. */
    private Integer m_dictItemId;

    /** The parent item's identity. */
    private Integer m_parentId;

    /** Item code. */
    private String m_dictItemCode;

    /** Item category type code. */
    private String m_dictTypeCode;

    /** Item value. */
    private String m_dictItemValue;

    /** Item name */
    private String m_dictItemName;

    /** Is item enabled? 0 means disable, 1 means enable. */
    private String m_isEnabled;

    /** Is item read only? 0 means can modify, 1 means read only. */
    private String m_isReadOnly;

    /** Is item load when server start? 0 means not load, 1 means load. */
    private String m_isLoadOnStart;

    /** Item's index number when a lot of item store in a list. */
    private Integer m_dictItemIndex;

    /** The item name's first pinyin code, whether the item name is Chinese. */
    private String m_pyCode;

    /** The item name's first wubi code, whether the item name is Chinese. */
    private String m_wbCode;

    /** Item description. */
    private String m_descn;

    /** Extends property 1. */
    private String m_property1;

    /** Extends property 2. */
    private String m_property2;

    /** Extends property 3. */
    private String m_property3;

    /** How many children does item have. */
    private Integer m_childCount;

    /**
     * Item code fully qualified name composed of parent's and itself's dictionary
     * code, the codes join with a period.
     */
    private String m_dictItemCodeFqn;

    public Dict ()
    {
    }

    public Dict (Integer dictItemId, Integer parentId, String dictItemCode, String dictTypeCode, String dictItemValue,
                 String dictItemName, String isEnabled, String isReadOnly, String isLoadOnStart, String dictItemCodeFqn)
    {
        super ();
        m_dictItemId = dictItemId;
        m_parentId = parentId;
        m_dictItemCode = dictItemCode;
        m_dictTypeCode = dictTypeCode;
        m_dictItemValue = dictItemValue;
        m_dictItemName = dictItemName;
        m_isEnabled = isEnabled;
        m_isReadOnly = isReadOnly;
        m_isLoadOnStart = isLoadOnStart;
        m_dictItemCodeFqn = dictItemCodeFqn;
    }

    public Dict (Integer dictItemId, Integer parentId, String dictItemCode, String dictTypeCode, String dictItemValue,
                 String dictItemName, String isEnabled, String isReadOnly, String isLoadOnStart, Integer dictItemIndex,
                 String pyCode, String wbCode, String descn, String property1,
                 String property2, String property3, String dictItemCodeFqn)
    {
        m_dictItemId = dictItemId;
        m_parentId = parentId;
        m_dictItemCode = dictItemCode;
        m_dictTypeCode = dictTypeCode;
        m_dictItemValue = dictItemValue;
        m_dictItemName = dictItemName;
        m_isEnabled = isEnabled;
        m_isReadOnly = isReadOnly;
        m_isLoadOnStart = isLoadOnStart;
        m_dictItemIndex = dictItemIndex;
        m_pyCode = pyCode;
        m_wbCode = wbCode;
        m_descn = descn;
        m_property1 = property1;
        m_property2 = property2;
        m_property3 = property3;
        m_dictItemCodeFqn = dictItemCodeFqn;
    }
    
    @Override
    public int hashCode ()
    {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((m_dictItemCode == null) ? 0 : m_dictItemCode.hashCode ());
        result = prime * result + ((m_dictItemCodeFqn == null) ? 0 : m_dictItemCodeFqn.hashCode ());
        result = prime * result + ((m_dictItemId == null) ? 0 : m_dictItemId.hashCode ());
        result = prime * result + ((m_dictTypeCode == null) ? 0 : m_dictTypeCode.hashCode ());
        return result;
    }

    @Override
    public boolean equals (Object obj)
    {
        if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (getClass () != obj.getClass ())
            return false;
        Dict other = (Dict) obj;
        if (m_dictItemCode == null)
        {
            if (other.m_dictItemCode != null)
                return false;
        }
        else if (!m_dictItemCode.equals (other.m_dictItemCode))
            return false;
        if (m_dictItemCodeFqn == null)
        {
            if (other.m_dictItemCodeFqn != null)
                return false;
        }
        else if (!m_dictItemCodeFqn.equals (other.m_dictItemCodeFqn))
            return false;
        if (m_dictItemId == null)
        {
            if (other.m_dictItemId != null)
                return false;
        }
        else if (!m_dictItemId.equals (other.m_dictItemId))
            return false;
        if (m_dictTypeCode == null)
        {
            if (other.m_dictTypeCode != null)
                return false;
        }
        else if (!m_dictTypeCode.equals (other.m_dictTypeCode))
            return false;
        return true;
    }

    public Integer getDictItemId ()
    {
        return m_dictItemId;
    }

    public void setDictItemId (Integer dictItemId)
    {
        m_dictItemId = dictItemId;
    }

    public Integer getParentId ()
    {
        return m_parentId;
    }

    public void setParentId (Integer parentId)
    {
        m_parentId = parentId;
    }

    public String getDictItemCode ()
    {
        return m_dictItemCode;
    }

    public void setDictItemCode (String dictItemCode)
    {
        m_dictItemCode = dictItemCode;
    }

    public String getDictTypeCode ()
    {
        return m_dictTypeCode;
    }

    public void setDictTypeCode (String dictTypeCode)
    {
        m_dictTypeCode = dictTypeCode;
    }

    public String getDictItemValue ()
    {
        return m_dictItemValue;
    }

    public void setDictItemValue (String dictItemValue)
    {
        m_dictItemValue = dictItemValue;
    }

    public String getDictItemName ()
    {
        return m_dictItemName;
    }

    public void setDictItemName (String dictItemName)
    {
        m_dictItemName = dictItemName;
    }

    public String getIsEnabled ()
    {
        return m_isEnabled;
    }

    public void setIsEnabled (String isEnabled)
    {
        m_isEnabled = isEnabled;
    }

    public String getIsReadOnly ()
    {
        return m_isReadOnly;
    }

    public void setIsReadOnly (String isReadOnly)
    {
        m_isReadOnly = isReadOnly;
    }

    public String getIsLoadOnStart ()
    {
        return m_isLoadOnStart;
    }

    public void setIsLoadOnStart (String isLoadOnStart)
    {
        m_isLoadOnStart = isLoadOnStart;
    }

    public Integer getDictItemIndex ()
    {
        return m_dictItemIndex;
    }

    public void setDictItemIndex (Integer dictItemIndex)
    {
        m_dictItemIndex = dictItemIndex;
    }

    public String getPyCode ()
    {
        return m_pyCode;
    }

    public void setPyCode (String pyCode)
    {
        m_pyCode = pyCode;
    }

    public String getWbCode ()
    {
        return m_wbCode;
    }

    public void setWbCode (String wbCode)
    {
        m_wbCode = wbCode;
    }

    public String getDescn ()
    {
        return m_descn;
    }

    public void setDescn (String descn)
    {
        m_descn = descn;
    }

    public String getProperty1 ()
    {
        return m_property1;
    }

    public void setProperty1 (String property1)
    {
        m_property1 = property1;
    }

    public String getProperty2 ()
    {
        return m_property2;
    }

    public void setProperty2 (String property2)
    {
        m_property2 = property2;
    }

    public String getProperty3 ()
    {
        return m_property3;
    }

    public void setProperty3 (String property3)
    {
        m_property3 = property3;
    }

    public Integer getChildCount ()
    {
        return m_childCount;
    }

    public void setChildCount (Integer childCount)
    {
        m_childCount = childCount;
    }

    public String getDictItemCodeFqn ()
    {
        return m_dictItemCodeFqn;
    }

    public void setDictItemCodeFqn (String dictItemCodeFqn)
    {
        m_dictItemCodeFqn = dictItemCodeFqn;
    }

    private static final long serialVersionUID = -6639671317744041317L;
    
    @Override
    public String toString ()
    {
        return "Dict [m_childCount=" + m_childCount + ", m_descn=" + m_descn + ", m_dictItemCode=" + m_dictItemCode
               + ", m_dictItemCodeFqn=" + m_dictItemCodeFqn + ", m_dictItemId=" + m_dictItemId + ", m_dictItemIndex="
               + m_dictItemIndex + ", m_dictItemName=" + m_dictItemName + ", m_dictItemValue=" + m_dictItemValue
               + ", m_dictTypeCode=" + m_dictTypeCode + ", m_isEnabled=" + m_isEnabled + ", m_isLoadOnStart="
               + m_isLoadOnStart + ", m_isReadOnly=" + m_isReadOnly + ", m_parentId=" + m_parentId + ", m_property1="
               + m_property1 + ", m_property2=" + m_property2 + ", m_property3="
               + m_property3 + ", m_pyCode=" + m_pyCode + ", m_wbCode=" + m_wbCode + "]";
    }
}
